addFavorite = function(info_seq , carc_name) {
		var tList = new StorageMapArrayList('carcenter');
		tList.add(info_seq, carc_name);
		tList.setStorage();
		alert('즐겨찾기에 추가하였습니다.');
	};
	
goCarcenterInfoPage = function(info_seq) {
	console.log('info_seq : ' + info_seq);
	var url = "/carc/m/v/carc_info.gcm";
	$.post( url , {'info_seq' : info_seq} , function(data){
		$('#index_main').html(data);
	});
};
	
goCarcenterInfoMap = function(info_seq , lat , lng) {
	var url = "/carc/m/v/carc_info_map.gcm";
	$.post( url , {'info_seq' : info_seq , 'lat' : lat , 'lng' : lng} , function(data){
		$('#index_main').html(data);
		//daumMap(lat , lng);
	//	googleMap(lat , lng);
	});
};

googleMap = function(lat , lng , display_name , target_div) {
	var map_div= document.getElementById("map_div");
	if(target_div) map_div = document.getElementById(target_div);
	var latlng = new google.maps.LatLng(lat , lng);
	if(!display_name) display_name = "현재 위치";
	var gmap = new google.maps.Map(
		map_div , {
			zoom:16,
			center:latlng,
			mapTypeId: google.maps.MapTypeId.ROADMAP
		}		
	);
	
	var marker = new google.maps.Marker({
		position: latlng,
		map: gmap,
		title: display_name
	});
	
	return gmap;
};

daumMap = function(lat , lng) {
	var position = new daum.maps.LatLng( lat , lng );
	
	map = new daum.maps.Map(document.getElementById('map_div'), {
		center: position,
		level: 4,
	//	mapTypeId: daum.maps.MapTypeId.HYBRID
	});
	
	var marker = new daum.maps.Marker({
		position: position
	});
	marker.setMap(map);
	
	var infoWin = new daum.maps.InfoWindow({
		content: '현재위치!!'
	});
	infoWin.open(map, marker);
	
	var zoomControl = new daum.maps.ZoomControl();
	map.addControl(zoomControl, daum.maps.ControlPosition.RIGHT);
	var mapTypeControl = new daum.maps.MapTypeControl();
	map.addControl(mapTypeControl, daum.maps.ControlPosition.TOPRIGHT);
};

zoomIn = function() {
	map.setLevel(map.getLevel() - 1);
};

zoomOut = function() {
	map.setLevel(map.getLevel() + 1);
};

goCarcenterEvaluationPage = function(info_seq) {
	var url = "/carc/m/v/carc_info_evaluation.gcm";
	$.post( url , {'info_seq' : info_seq} , function(data) {
		$('#index_main').html(data);
	});
};

doInsertEvaluation = function(info_seq , writer_name , grade , content) {
	var url = "/carc/m/i/evaluation.gcm";
	if(info_seq && writer_name && grade && content) {
		$.post( url , {'info_seq' : info_seq , 'writer_name' : writer_name ,'grade' : grade , 'content' : content} , function(data) {
			goCarcenterEvaluationPage(info_seq);
		} );	
	}
	else {
		if(!writer_name) alert('작성자명을 입력해 주세요.');
		else if(!content) alert('평가내용을 입력해 주세요.');
		else if(!grade) alert('평점을 입력해 주세요.');
	}
};

popupInsertEval = function() {
	
	$('#page_evaluation_div').show();
}